import { httpGet, httpPost } from '@/utils/http'
import {
  SelectDishList,
  SelectDishTypeList,
  CardDishList,
  HistoryList,
  MyOrderDishList
} from '@/service/business/orderingDishes/type'
// 查询当前预点菜接口
export const getSelectDish = (params = {}) => {
  return httpGet<SelectDishList>('/commentApp/dish/selectDish', params)
}

//  获取菜肴分类接口
export const getDishTypeSpecialty = (params = {}) => {
  return httpGet<SelectDishTypeList>('/commentApp/dish/getDishTypeSpecialty', params)
}
//  点菜接口
export const getAddBudgetOrder = (params = {}) => {
  return httpPost('/commentApp/dish/addBudgetOrder', params)
}
// 从后台获取点菜列表
export const getSelectBudgetOrder = (params = {}) => {
  return httpGet<CardDishList>('/commentApp/dish/selectBudgetOrder', params)
}
// 删除点菜 0表示清空
export const getDeleteBudgetOrder = (params = {}) => {
  return httpGet<CardDishList>('/commentApp/dish/deleteBudgetOrder', params)
}
// 提交点菜
export const getSubNeedDishList = (params = {}) => {
  return httpGet('/commentApp/dish/subNeedDishList', params)
}
// 关注菜品
export const getSaveOneAttention = (params = {}) => {
  return httpGet('/commentApp/dish/saveOneAttention', params)
}
// 取消关注菜品
export const getDeleteOneAttention = (params = {}) => {
  return httpGet('/commentApp/dish/deleteOneAttention', params)
}
// 按ID查询历史搜索
export const getSelectHistory = (params = {}) => {
  return httpGet<HistoryList>('/commentApp/dish/selectHistory', params)
}
// 获取点菜列表
export const getMyOrderDish = (params = {}) => {
  return httpGet<MyOrderDishList>(`/commentApp/dish/getMyOrderDish`,  params )
    
};
